package com.xbj.cloud.controller;

import com.xbj.cloud.commons.apis.Pay8001FeignApi;
import com.xbj.cloud.commons.resp.ResultData;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 观雾
 * @create: 2024-08-30
 * @description:
 **/
@RestController
@Tag(name = "服务链路追踪测试模块",description = "服务链路追踪测试类")
public class OrderMicrometerController {
    private static final Logger LOG = LoggerFactory.getLogger(OrderMicrometerController.class);

    @Resource
    private Pay8001FeignApi pay8001FeignApi;

    @GetMapping(value = "/orderMicrometer/testMicrometer/{id}")
    @Operation(summary = "Micrometer(服务链路追踪)测试方法summary",description = "Micrometer(服务链路追踪)测试方法description")
    public ResultData testOrderMicrometer(@PathVariable(value = "id") Integer id){
        LOG.info("Micrometer(服务链路追踪)测试方法");
        ResultData resultData = pay8001FeignApi.testPayMicrometer(id);
        return resultData;
    }

}
